/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.sbbs.jsf.car.dao;

import javax.ejb.Startup;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Singleton;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author Mr.fdc <fdc_messenger@126.com>
 */
@Singleton
@Startup
//@ApplicationScoped
public class EmFactory {

    @PersistenceContext(unitName = "CARPU")
    private static EntityManager entityManager;

    public static EntityManager getEm() {
        return entityManager;
    }

}
